package com.ruoyi.project.bas.msgTray.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.project.bas.msgTray.domain.TrayCodeMsg;
import com.ruoyi.project.bas.msgTray.mapper.TrayCodeMsgMapper;
import com.ruoyi.project.bas.msgTray.service.ITrayCodeMsgService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 托盘信息Service业务层处理
 * 
 * @author wz
 * @date 2023-03-27
 */
@Service
public class TrayCodeMsgServiceImpl implements ITrayCodeMsgService
{
    @Autowired
    private TrayCodeMsgMapper trayCodeMsgMapper;

    /**
     * 查询托盘信息
     * 
     * @param uuid 托盘信息ID
     * @return 托盘信息
     */
    @Override
    public TrayCodeMsg selectTrayCodeMsgById(Long uuid)
    {
        return trayCodeMsgMapper.selectTrayCodeMsgById(uuid);
    }

    /**
     * 查询托盘信息列表
     * 
     * @param trayCodeMsg 托盘信息
     * @return 托盘信息
     */
    @Override
    public List<TrayCodeMsg> selectTrayCodeMsgList(TrayCodeMsg trayCodeMsg)
    {
        return trayCodeMsgMapper.selectTrayCodeMsgList(trayCodeMsg);
    }

    /**
     * 新增托盘信息
     * 
     * @param trayCodeMsg 托盘信息
     * @return 结果
     */
    @Override
    public int insertTrayCodeMsg(TrayCodeMsg trayCodeMsg)
    {
        return trayCodeMsgMapper.insertTrayCodeMsg(trayCodeMsg);
    }

    /**
     * 修改托盘信息
     * 
     * @param trayCodeMsg 托盘信息
     * @return 结果
     */
    @Override
    public int updateTrayCodeMsg(TrayCodeMsg trayCodeMsg)
    {
        return trayCodeMsgMapper.updateTrayCodeMsg(trayCodeMsg);
    }

    /**
     * 删除托盘信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTrayCodeMsgByIds(String ids)
    {
        return trayCodeMsgMapper.deleteTrayCodeMsgByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除托盘信息信息
     * 
     * @param uuid 托盘信息ID
     * @return 结果
     */
    @Override
    public int deleteTrayCodeMsgById(Long uuid)
    {
        return trayCodeMsgMapper.deleteTrayCodeMsgById(uuid);
    }
}
